package com.s08.e01.utils;

import com.s08.e01.model.StandardUser;
import com.s08.e01.model.User;

public class UserUtils {

	public static void listUsers(User[] users) {
		for (User user : users) {

			System.out.println(user);
			if (user instanceof StandardUser) {
				System.out
						.println(((StandardUser) user).showDiscountProducts());
			}
		}
	}

	public static void listUserProducts(User[] users) {

		for (User user : users) {

			System.out.println(user);
			System.out.println(user.showProducts());
		}
	}
}
